function [EV] = calc_EV(C_target_vec, wage_guesses_temp, P_a_vec, P_m_vec, P_s_vec, epsilon_a,epsilon_m,epsilon_s,sigma,omega_a,omega_m,omega_s,num_comps,n_countries);
   
wage_guesses_original = wage_guesses_temp;
distance_vec = 100*ones(1,n_countries);

while max(abs(distance_vec)) > 0.01
[~,C_temp_vec,~,~,~,~,~,~] = calculate_consumption_shares_parallel_func(wage_guesses_temp,P_a_vec,P_m_vec,P_s_vec,epsilon_a,epsilon_m,epsilon_s,sigma,omega_a,omega_m,omega_s,num_comps,n_countries);

distance_vec = (C_target_vec-C_temp_vec)./C_target_vec;

wage_guesses_temp = wage_guesses_temp.*(ones(1,n_countries)+0.05*distance_vec);
end

EV = wage_guesses_temp./wage_guesses_original;

